package vo

// ResultList 通用结果列表结构
type ResultList struct {
	Content       interface{} `json:"content"`
	TotalElements int64       `json:"totalElements"`
	ExtendData    interface{} `json:"extendData,omitempty"`
}

// CursorResultList 游标分页结果列表结构
type CursorResultList struct {
	Content    interface{} `json:"content"`
	NextID     int64       `json:"next_id,omitempty"`
	ExtendData interface{} `json:"extendData,omitempty"`
}

// NewResultList 创建一个新的ResultList实例
func NewResultList(content interface{}, totalElements int64) *ResultList {
	return &ResultList{
		Content:       content,
		TotalElements: totalElements,
	}
}

// NewCursorResultList 创建一个新的CursorResultList实例
func NewCursorResultList(content interface{}, nextID int64) *CursorResultList {
	return &CursorResultList{
		Content: content,
		NextID:  nextID,
	}
}
